Skip to content

BAU: Bump xstate from 4.26.1 to 5.31.0#3371

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/main/xstate-5.31.0
Open

BAU: Bump xstate from 4.26.1 to 5.31.0#3371
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/main/xstate-5.31.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 6, 2026

Bumps xstate from 4.26.1 to 5.31.0.

Release notes

Sourced from xstate's releases.

xstate@5.31.0

Minor Changes

  • #5429 9d9c1fe Thanks @​davidkpiano! - Add mapState(snapshot, mapper) to map a snapshot to values based on active state(s).

    import { mapState } from 'xstate';
    const results = mapState(snapshot, {
    states: {
    loading: { map: () => 'Loading...' },
    success: { map: (snap) => snap.context.data },
    error: { map: (snap) => snap.context.error.message }
    }
    });
    console.log(results);
    // E.g. if snapshot.value === 'loading', then:
    // [
    //   { stateNode: { key: 'loading' }, result: 'Loading...' }
    // ]

  • #5430 e543599 Thanks @​davidkpiano! - Add maxIterations option to configure the maximum number of microsteps allowed before throwing an infinite loop error. The default is Infinity (no limit) to avoid breaking existing machines.

    You can configure it when creating a machine:

    const machine = createMachine({
      // ... machine config
      options: {
        maxIterations: 1000 // set a limit to enable infinite loop detection
      }
    });

xstate@5.30.0

Minor Changes

  • #5493 871857d Thanks @​davidkpiano! - Add a filterEvents option to xstate/graph traversal helpers and createTestModel(...) to control which events should be explored from each state.

    This makes it possible to opt into enabled-only traversal for machine snapshots, such as when you only want to explore events that currently pass guards:

    import { createTestModel } from 'xstate/graph';
    const model = createTestModel(machine);

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for xstate since your current version.


@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels May 6, 2026
@dependabot dependabot Bot requested review from a team as code owners May 6, 2026 12:05
@BeckaL
Copy link
Copy Markdown
Contributor

BeckaL commented May 12, 2026

@dependabot rebase

Bumps [xstate](https://github.com/statelyai/xstate) from 4.26.1 to 5.31.0.
- [Release notes](https://github.com/statelyai/xstate/releases)
- [Commits](https://github.com/statelyai/xstate/compare/xstate@4.26.1...xstate@5.31.0)

---
updated-dependencies:
- dependency-name: xstate
  dependency-version: 5.31.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/main/xstate-5.31.0 branch from 0523316 to 7fac07e Compare May 12, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant